//! @author Adam Emil Skoog
//! @date   2011-12-24

#ifndef KEDJA_MOUSE_INPUT_EVENT_RECEIVER_H_
	#define KEDJA_MOUSE_INPUT_EVENT_RECEIVER_H_
	#include "EventReceiver.h"
	#include "EventManager.h"

	namespace kedja
	 {
		/**
		 * Event receiver for handling mouse input.
		 */
		class MouseInputEventReceiver : public EventReceiver
		 {
			public:
				// Declare functions.
				MouseInputEventReceiver();
				void registerOnMouseButtonPress(void (*function)(const mouse::Button &));
				void deregisterOnMouseButtonPress();
				void registerOnMouseButtonRelease(void (*function)(const mouse::Button &));
				void deregisterOnMouseButtonRelease();

			private:
				// Receivers.
				static std::vector<MouseInputEventReceiver *> *mouseInputEventReceivers;

				// Functions.
				void (*onMouseButtonPress)(const mouse::Button &);
				void (*onMouseButtonRelease)(const mouse::Button &);

				// Declare functions.
				static void initialise();
				static void deinitialise();
				static MouseInputEventReceiver *const getMouseInputEventReceiver(const unsigned &);
				static const unsigned getMouseInputEventReceiverCount();

			friend class EventManager;
			friend class Component;
		 };
	 }
#endif
